// ExpProbInterface.H

#ifndef ExpProbInterface_H
#define ExpProbInterface_H

#include <Epetra_Vector.h>
#include <LOCA_Parameter_Vector.H>
#include <NOX_Epetra_Interface_Jacobian.H>
#include <LOCA_Epetra_Interface_Required.H>

#include "ExpWaveProb.H"

#define EVALINIT -9999

class ExpProbInterface :
  public LOCA::Epetra::Interface::Required,
  public NOX::Epetra::Interface::Jacobian
{
  private:
    char *contParam;
    double prevEval;
    double prevEval2;
    double prevEval0;
    bool flag0;
    bool flag1;
    bool flag2;
  public:
    ExpProbInterface(ExpWaveProb &prob, char *contparam);
    ~ExpProbInterface();

    void printSolution(const Epetra_Vector &x, double Q);
    void printEigenvector(const Epetra_Vector &x, double eval, int which);

    //! Compute and return F
    bool computeF(const Epetra_Vector& x, Epetra_Vector& F, FillType ft);

    //! Compute an explicit Jacobian
    bool computeJacobian(const Epetra_Vector& x, Epetra_Operator& Jac);

    //! Set a parameter in the user's code.
    void setParameters(const LOCA::ParameterVector& params);

    //! Application Operator: Object that points to the user's evaluation routines.
    /*! This is used to point to the actual routines and to store 
     *  auxiliary data required by the user's application for function/Jacobian
     *  evaluations that NOX does not need to know about.  This is type of 
     *  passdown class design by the application code.
     */ 
    ExpWaveProb & problem;
};

#endif
